Reflection for Statically Typed Languages

نویسنده

  • José de Oliveira Guimarães
چکیده

An object-oriented language that permits changing the behavior of a class or of a single object is said to support computational reflection. Existing reflective facilities in object-oriented languages are either complex, type unsafe, or have a large performance penalty. We propose a simple, easy-to-understand, and statically typed model that captures much of the functionalities of other reflective facilities. It brings the power of reflection to the world of type safe and efficient languages.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Self-Interpretation and Reflection in a Statically Typed Language

Reflection is the ability of a system to perform a computation about itself. This ability typically includes a way of representing programs as data (“reification”) and of executing representations of programs (“selfinterpretation”). The interpreter is accessible to the interpreted program in the form of an “eval” function. Reflection is traditionally studied in untyped or dynamically typed lang...

متن کامل

Efficient virtual machine support of runtime structural reflection

Increasing trends towards adaptive, distributed, generative and pervasive software have made object-oriented dynamically typed languages become increasingly popular. These languages offer dynamic software evolution by means of reflection, facilitating the development of dynamic systems. Unfortunately, this dynamism commonly imposes a runtime performance penalty. In this paper, we describe how t...

متن کامل

A Reflection on Types

The ability to perform type tests at runtime blurs the line between statically-typed and dynamically-checked languages. Recent developments in Haskell’s type system allow even programs that use reflection to themselves be statically typed, using a type-indexed runtime representation of types called TypeRep. As a result we can build dynamic types as an ordinary, statically-typed library, on top ...

متن کامل

Run-time Manipulation of Programs in a Statically-Typed Language

This article is an extended abstract of a doctoral dissertation on metaprogramming and programming language design. A metaprogramming model is studied and implemented in a statically–typed pure object– oriented programming language Zero. The object model of language is based on closures which enables metaprogramming model to achieve a high degree of dynamic manipulation, normally only found in ...

متن کامل

Dynamic Reflection for a Statically Typed Language

We present a runtime metalevel interface for BETA. BETA is a compiled and statically typed object-oriented programming language. The metalevel interface preserves the type safe properties of the language and supports static type checking. This is achieved through a novel language construct, the attribute reference, on top of which the metalevel interface is built. The metalevel interface is bas...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1998